/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.isd.venta.modelo;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author Claudio
 */
@Embeddable
public class DireccionesDeEntregaPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "VTTENT_NROCTA", nullable = false, length = 13)
    private String nrocta;
    @Basic(optional = false)
    @Column(name = "VTTENT_CDENTR", nullable = false, length = 6)
    private String cdentr;

    public DireccionesDeEntregaPK() {
    }

    public DireccionesDeEntregaPK(String nrocta, String vttentCdentr) {
        this.nrocta = nrocta;
        this.cdentr = vttentCdentr;
    }

  
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nrocta != null ? nrocta.hashCode() : 0);
        hash += (cdentr != null ? cdentr.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DireccionesDeEntregaPK)) {
            return false;
        }
        DireccionesDeEntregaPK other = (DireccionesDeEntregaPK) object;
        if ((this.nrocta == null && other.nrocta != null) || (this.nrocta != null && !this.nrocta.equals(other.nrocta))) {
            return false;
        }
        if ((this.cdentr == null && other.cdentr != null) || (this.cdentr != null && !this.cdentr.equals(other.cdentr))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.venta.modelo.DireccionesDeEntregaPK[vttentNrocta=" + nrocta + ", vttentCdentr=" + cdentr + "]";
    }

}
